#include<iostream>
using namespace std;
class class1{
    //private/public/protected:
    //    Data variables;
    //    Member functions(){};
    public:
        int length;
        int getLen(void);
        void setLen(int len){//自动内联
            length = len; 
            return;
        }
        void outLen();
};
int class1::getLen(void) { return length; };//外联
//inline建立
inline void class1::outLen() {
    cout << "length:" << length << endl;
    return;
};
int main(){
    class1 c1;
    c1.length = 50;
    int len;
    len = c1.getLen();
    cout<<len<<endl;
    return 0;
}